<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="author" content="wangbo">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div>div1</div>
  <div>div2</div>
  <div>div3</div>
  <div>div4</div>

</body>
<script>

    
  let body = document.querySelector("body")
 //  let arr = body.children
 //  for (let i = 0; i < arr.length; i++) {
 //   arr[i].remove()
 //  }
 //  console.log(arr);


  // for (const child of body.children) {
  //  child.remove(0)
  // }
 </script>
</html>